unit MainTransactionRecordFr;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics,
  Dialogs, DBCtrls, ActnList, MainRecordFr;

type

  { TMainTransactionRecordFrame }

  TMainTransactionRecordFrame = class(TMainRecordFrame)

  public
    function InTransaction(): boolean;
  end;

implementation

uses ZDataset;

{ TMainTransactionRecordFrame }
{
procedure TMainTransactionRecordFrame.ControlaBotoes();
var
  InTrans: boolean;
begin
  inherited ControlaBotoes;
  //InTransaction := MainDataModule.InTransaction();
end; }

function TMainTransactionRecordFrame.InTransaction: boolean;
begin
  if (MainDataModule <> nil) and (MainDataModule.MainDataSet <> nil) then begin
    Result := TZQuery(MainDataModule.MainDataSet).Connection.InTransaction;
  end else begin
    Result := False;
  end;
end;

initialization
  {$I maintransactionrecordfr.lrs}

end.








